﻿using System;
using System.Collections.Generic;
using System.ComponentModel.Composition;
using System.Configuration;
using System.Data.Common;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EFBase
{  
    public class EFDbContext : DbContext
    {
        public string NameOrConnectionString { get; set; }
        public EFDbContext(string nameOrConnectionString)
            :base(nameOrConnectionString)
        {
            if(string.IsNullOrEmpty(nameOrConnectionString))
            {
                throw new Exception("App.Config为设置NameOrConnectionString的值");
            }
            NameOrConnectionString = nameOrConnectionString;
        }
    }
}
